<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<title></title>
</head>
<body>

</body>
</html>

<script>
	var str="HelloMyWorld";
	var arr = str.split("");
	for(var i=1;i<arr.length;i++){
		if (arr[i]>="A" && arr[i]<="Z") {
			arr[i]=arr[i].toLowerCase()
			arr.splice(i,0," ");
		}		
	}

	document.write(arr.join(""));


</script>